﻿using System.Collections.Generic;
using Microsoft.WowAddonStudio.Lua.LanguageService.Model;
using Microsoft.WowAddonStudio.Lua.Model;

namespace Microsoft.WowAddonStudio.Lua.LanguageService.Intellisense
{
    /// <summary>
    /// Provides declarations for the <see cref="LuaAuthoringScope"/> as part of the result of a parse request.
    /// </summary>
    public interface IDeclarationProvider
    {
        /// <summary>
        /// Initializes the declaration provider.
        /// </summary>
        /// <param name="parseRequest">The parse request.</param>
        void Initialize(LuaParseRequest parseRequest);
        
        /// <summary>
        /// Gets the declarations.
        /// </summary>
        /// <returns>An enumerable collection of <see cref="Declaration"/> instances.</returns>
        IEnumerable<Declaration> GetDeclarations();

        /// <summary>
        /// Gets the methods.
        /// </summary>
        /// <returns>An enumerable collection of <see cref="Function"/> instances.</returns>
        IEnumerable<Function> GetMethods();

        /// <summary>
        /// Gets a data tip.
        /// </summary>
        /// <returns>An instance of the <see cref="DataTip"/> class or null if no data tip can be provided.</returns>
        DataTip GetDataTip();

        /// <summary>
        /// Gets the source of the declaration.
        /// </summary>
        /// <returns>An instance of the <see cref="DeclarationSource"/> class or null if no declaration source can be provided.</returns>
        DeclarationSource GetDeclarationSource();
    }
}